<?php

class SQLHelper {

    public static function executeQuerry($statement) {
        try {
            $con = mysql_connect("ltuprj.qv.vic.edu.au", "Cerberus", "mEtaekdT") or die("Error");
            
            $result = mysql_query($statement, $con);
           
            
//            $count = 0;
//            while ($row = mysql_fetch_row($result))
//            {
//                $count++;
//            }
            
            //echo $count;
            
            mysql_close($con);
            
        } catch (Exception $ex) {
            echo $ex;
        }
        return $result;
    }

    public static function executeNonQuerry($statement) {
        try {
            $con = mysql_connect("ltuprj.qv.vic.edu.au", "Cerberus", "mEtaekdT") or die("Error");
          
            $result = mysql_query($statement, $con);

            mysql_close($con);
            
        } catch (Exception $ex) {
            echo $ex;
        }
    }

}
?>

